Current File : //usr/lib/python3/dist-packages/rich/__pycache__/_fileno.cpython-312.pyc |
�
"T�e � �( � d dl mZ d dlmZmZ dd�Zy)� )�annotations)�IO�Callablec �P � t | dd� }|� |� S y# t $ r Y yw xY w)z�Get fileno() from a file, accounting for poorly implemented file-like objects.
Args:
file_like (IO): A file-like object.
Returns:
int | None: The result of fileno if available, or None if operation failed.
�filenoN)�getattr� Exception)� file_liker s �./usr/lib/python3/dist-packages/rich/_fileno.py�
get_filenor s? � � (/�y�(�D�'I�F�
�� ��8�O� �� � � � �s � � %�%N)r
zIO[str]�returnz
int | None)�
__future__r �typingr r r � � r �<module>r s �� "� �r